<?php

/**
 * Description of Clen
 *
 * @author buddha
 */
class ClenPresenter extends BasePresenter {

    /**
     * (non-phpDoc)
     *
     * @see Nette\Application\Presenter#startup()
     */
    protected function startup() {
        parent::startup();
    }

    public function renderDefault() {
        
    }

    public function actionPrihlas() {
       if (!$this->getUser()->isLoggedIn()) // AND !$this->context->facebook->getUser()->isLoggedIn())
		{
			$backlink = $this->getApplication()->storeRequest();
			$this->redirect('Sign:in', array('backlink' => "Clen:info"));
		}
    }

    public function actionOdhlas() {
        actionOut();
    }

    
    public function renderInfo() {
        $this->presenter->userid=$this->user->getIdentity()->getId();
        $this->presenter->userrole=$this->user->getIdentity()->getRoles();
    }

}